package com.tender.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope // 以 这个bean 为单位，可以动态感知里面的属性的变化
public class ProviderController {

    @Value("${server.port}")
    private String port;

    @GetMapping("/export/port")
    public String exportPort() {
        return port;
    }

}
